
echo "This is a file 1." > /tmp/file1.txt
echo "This is a file 2." > /tmp/file2.txt
echo "This is a file 3." > /tmp/file3.txt
echo "This is a file 4." > /tmp/file4.txt

echo "
add_file /tmp/file1.txt
checkout file1.txt
checkin file1.txt First rev, no modification
checkout file1.txt
quit" > input.txt

./cmclient User1 127.0.0.1 < input.txt

echo "Modification" >> file1.txt


echo "
checkin file1.txt Second rev, Added a line
quit" > input.txt

./cmclient User1 127.0.0.1 < input.txt

echo "------------------"

echo "
get file1.txt 0
quit" > input.txt
./cmclient User2 127.0.0.1 < input.txt
cat file1.txt

echo "------------------"
echo "
get file1.txt 1
quit" > input.txt
./cmclient User2 127.0.0.1 < input.txt
cat file1.txt

echo "------------------"
echo "
get file1.txt 2
quit" > input.txt
./cmclient User2 127.0.0.1 < input.txt
cat file1.txt

echo "------------------"
echo "
get file1.txt 3
quit" > input.txt
./cmclient User2 127.0.0.1 < input.txt
cat file1.txt

echo "------------------"
echo "
get file1.txt
quit" > input.txt
./cmclient User2 127.0.0.1 < input.txt
cat file1.txt

echo "------------------"
echo
echo

echo "
add_file /tmp/file2.txt
update_owner + userA file2.txt
update_owner + userB file2.txt
update_owner + userC file2.txt
update_owner - userB file2.txt
update_owner + userB file1.txt
quit" > input.txt
./cmclient User7 127.0.0.1 < input.txt


echo "------------------"
echo

echo "
add_file /tmp/../tmp/file3.txt
add_file /tmp/file4.txt
checkout file3.txt
quit" > input.txt
./cmclient UserE 127.0.0.1 < input.txt

echo "------------------"
echo

echo "
view_files
view_versions file1.txt
view_versions file2.txt
quit" > input.txt
./cmclient User3 127.0.0.1 < input.txt

echo "------------------"
echo


echo "
view_my_co
undo_checkout file1.txt
view_my_co
checkout file1.txt
view_my_co
undo_checkout file1.txt
view_my_co
undo_checkout file2.txt
checkout file1.txt
checkin file1.txt Last rev, no modification
undo_checkout file1.txt
quit" > input.txt

./cmclient User1 127.0.0.1 < input.txt







